package com.example.java_second_hand_market;


import java.util.Vector;

public class Item {
     private String name;
     private String Price;
     private boolean issold;
     private Vector<String> tag;     //限制为三个tag第一个为书籍类型，第二个为作品题材，第三个为作者
     private Seller seller;
     private int InfoId;

    public Item( String name, String price,String seller,int infoId) {
        this.seller= new Seller(seller,"","");
        this.name = name;
        Price = price;
        InfoId=infoId;
    }

    public Item(String name, String price, Seller seller, int infoId, String booktype, String booktopic, String author) {
        this.name = name;
        Price = price;
        this.issold = false;
        this.seller = seller;
        InfoId = infoId;
        this.tag.add(booktype);
        this.tag.add(booktopic);
        this.tag.add(author);
    }

    public String getName() {
        return name;
    }

    public String getPrice() {
        return Price;
    }

    public boolean isIssold() {
        return issold;
    }

    public Vector<String> getTag() {
        return tag;
    }

    public Seller getSeller() {
        return seller;
    }

    public int getInfoId() {
        return InfoId;
    }

    public void setPrice(String price) {
        Price = price;
    }

    public void setIssold(boolean issold) {
        this.issold = issold;
    }


}
